package util

import (
	"fmt"
	"strconv"
)

// StringToInt string=>int
func StringToInt(s string, n int) (i int64) {
	if s == "" {
		i = 0
		return
	}
	i, err := strconv.ParseInt(s, 10, n)
	if err != nil {
		fmt.Println("格式转换出错")
	}
	return
}
